{config_load file=fb_lang_conf}

{literal}
<style type="text/css">
.facebook-login{ 
margin-bottom:5px;
}
</style>
{/literal}

{if !$user_authenticated}
	<a style="font-weight:bold;width:100%;" class='btn btn-primary facebook-login' title="Register via Facebook" href='{$my_pligg_base}/modules/fb/fb.php?mode=start' onclick='window.open("{$my_pligg_base}/modules/fb/fb.php?mode=start","new","width=300, height=300, toolbar=no, location=yes, directories=no, menubar=no, fullscreen=no"); return false;' tabindex="2"><img src="{$my_pligg_base}/modules/fb/images/fb-logo-white.png" style="margin-top:-2px;" /> {#PLIGG_FB_Button#}</a>
{else}
	{php}
	global $current_user;
	if ($current_user->user_id)
	{
		$fb_user = new User;
		$fb_user->id = $current_user->user_id;
		$fb_user->read();
	}

	if (!$fb_user->extra_field['user_fb'])
	{
	{/php}
		<a style="font-weight:bold;width:100%;" class='btn btn-primary facebook-login' title="Connect to Facebook" href='{$my_base_url}{$my_pligg_base}/modules/fb/fb.php?mode=start' onclick='window.open("{$my_pligg_base}/modules/fb/fb.php?mode=start","new","width=300, height=300, toolbar=no, location=yes, directories=no, menubar=no, fullscreen=no"); return false;' tabindex="2"><img src="{$my_pligg_base}/modules/fb/images/fb-logo-white.png" style="margin-top:-2px;" /> {#PLIGG_FB_Button#}</a>
	{php}
	}
	{/php}
{/if}

{config_load file="/languages/lang_".$pligg_language.".conf"}
